Alex Crichton [Mon, 4 Aug 2014 14:21:31 +0000 (07:21 -0700)]
Allow documenting binary targets.
This removes the check in the compilation phase, but adds an error if you're
documenting a library and a binary with the same name (as the rustdoc output
would conflict).
bors [Mon, 4 Aug 2014 04:34:57 +0000 (04:34 +0000)]
auto merge of #309 : alexcrichton/cargo/snapshots, r=wycats
These snapshots have the lockfile plus the per-target fingerprints. This also
additionally adds a lockfile to the repo for all our deps.
Alex Crichton [Sat, 2 Aug 2014 18:59:33 +0000 (11:59 -0700)]
Register new snapshots
These snapshots have the lockfile plus the per-target fingerprints. This also
additionally adds a lockfile to the repo for all our deps.
bors [Mon, 4 Aug 2014 03:25:05 +0000 (03:25 +0000)]
auto merge of #314 : alexcrichton/cargo/hurray-for-windows, r=wycats
On windows, git will check out files with different line endings causing the
same serialized resolve to be resolved slightly differently. Instead of
comparing contents, this commit alters by testing whether the decoded resolve is
equivalent to the to-be-written resolve and only aborts writing if the two are
equal.
Alex Crichton [Mon, 4 Aug 2014 01:38:25 +0000 (18:38 -0700)]
Deal with different encodings of Cargo.lock
On windows, git will check out files with different line endings causing the
same serialized resolve to be resolved slightly differently. Instead of
comparing contents, this commit alters by testing whether the decoded resolve is
equivalent to the to-be-written resolve and only aborts writing if the two are
equal.
bors [Sun, 3 Aug 2014 17:07:06 +0000 (17:07 +0000)]
auto merge of #303 : alexcrichton/cargo/issue-299, r=wycats
Closes #299
bors [Sat, 2 Aug 2014 18:41:09 +0000 (18:41 +0000)]
auto merge of #308 : alexcrichton/cargo/enable-optimize, r=alexcrichton
Alex Crichton [Sat, 2 Aug 2014 18:39:39 +0000 (11:39 -0700)]
Fix distcheck with --enable-optimize
bors [Sat, 2 Aug 2014 17:56:11 +0000 (17:56 +0000)]
auto merge of #294 : alexcrichton/cargo/here-we-go, r=wycats
This is a series of commits which culminate in fixing #214. The last remaining bit is that freshness for an entire package is still considered if the package has a `build` command, but that is pretty easy to fix and I plan on doing so soon-ish.
Alex Crichton [Sat, 2 Aug 2014 07:08:31 +0000 (00:08 -0700)]
Make freshness tests more robust with time travel
Add a helper function to forcibly move a tree back one hour so new edits are
picked up correctly.
Alex Crichton [Sat, 2 Aug 2014 17:16:35 +0000 (10:16 -0700)]
Add a --enable-optimize flag to ./configure
Alex Crichton [Sat, 2 Aug 2014 06:31:11 +0000 (23:31 -0700)]
Don't tromp over too many files when downloading the snapshot
Alex Crichton [Tue, 29 Jul 2014 18:27:40 +0000 (11:27 -0700)]
Implement per-target fingerprints
This commit refines the granularity of fingerprints from packages to targets,
building on the existing infrastructure. All invocations of rustc now include
the --dep-info flag which will emit makefile-like dependency information. This
information is then parsed later on to determine if all the files are fresh.
The purpose of this commit is to refine the set of files which indicate that a
target needs to be re-built. Before this commit if you modified a test it would
rebuild the entire library, but after this commit it only rebuilds the relevant
test.
Closes #214
Closes #289
Alex Crichton [Tue, 29 Jul 2014 17:20:42 +0000 (10:20 -0700)]
Prepare for per-target fingerprints
This commit refactors all related infrastructure for the cargo_rustc module to
move the granularity of fingerprints from packages to targets. This involved
heavily modifying the `JobQueue` structure to understand a finer-grained target
for dirtiness propagation and dependency management, and then dealing with
fallout in the main module.
The fingerprint module has been refactored to support a per-target fingerprint.
A fallout of this change is that each build step has its own fingerprint,
including the custom build command step. This will be implemented in a future
commit.
As fallout of this reorganization, we are now exploiting the maximal parallelism
within packages themselves whereas before we were only partially parallelizing.
No new features were added as part of this commit, so I just ensured that all
the tests ran.
Alex Crichton [Tue, 29 Jul 2014 04:23:48 +0000 (21:23 -0700)]
Power the TaskPool with a sync channel
This rate limits the jobs entering the pool to ensure that the number of
pending jobs is actually close to the number of cores. The current behavior is
to print all pending jobs, even when they're not executing, which may be
confusing.
Alex Crichton [Tue, 29 Jul 2014 04:13:30 +0000 (21:13 -0700)]
Make the dependency queue entirely generic
This paves the way for future intra-package parallelism as opposed to just
inter-package parallelism.
Steve Klabnik [Sat, 2 Aug 2014 01:56:12 +0000 (21:56 -0400)]
Fix the build.
After an upstream fix in docopt, cargo now builds on rust HEAD. Also,
move to the semver crate rather than the deprecated built-in one.
bors [Fri, 1 Aug 2014 22:29:29 +0000 (22:29 +0000)]
auto merge of #301 : alexcrichton/cargo/lockfile, r=wycats
This PR is a series of commits building off the `lockfile` branch which finishes the work on the lockfile as well as implementing the `cargo-update` command.
This PR deprecates the `-u` flag in favor of the `cargo update` command.
Alex Crichton [Fri, 1 Aug 2014 17:46:04 +0000 (10:46 -0700)]
Go back to manually stringifying resolve
Alex Crichton [Fri, 1 Aug 2014 17:39:11 +0000 (10:39 -0700)]
Ensure update updates all shared deps
Alex Crichton [Fri, 1 Aug 2014 15:52:51 +0000 (08:52 -0700)]
Ensure manifest paths are absolute paths
Closes #299
Alex Crichton [Thu, 31 Jul 2014 22:19:20 +0000 (15:19 -0700)]
Implement cargo-update
Alex Crichton [Thu, 31 Jul 2014 22:19:09 +0000 (15:19 -0700)]
Touch up some documentation around commands
Alex Crichton [Thu, 31 Jul 2014 19:53:17 +0000 (12:53 -0700)]
Add a small profiling framework
This should help aid in debugging slow parts of cargo by setting the
CARGO_PROFILE environment variable.
Alex Crichton [Thu, 31 Jul 2014 19:24:07 +0000 (12:24 -0700)]
Avoid executing git in fingerprint()
We already discovered the local rev earlier on, so there's no need to rediscover
it through git.
Alex Crichton [Thu, 31 Jul 2014 19:20:05 +0000 (12:20 -0700)]
Optimize freshness of git repos
This commit cuts down on the number of invocations of `git` to make the "happy
path" of an up-to-date git repo much smoother. The precise information is also
applied from the lockfile to speed things up.
Alex Crichton [Thu, 31 Jul 2014 19:18:59 +0000 (12:18 -0700)]
Be sure to not emit a lone `?` in a URL
Alex Crichton [Thu, 31 Jul 2014 19:18:09 +0000 (12:18 -0700)]
Use sources from the lockfile
The sources in the lock file contain precise information about git deps so we
want them over the non-precise versions in the source.
Alex Crichton [Thu, 31 Jul 2014 17:20:33 +0000 (10:20 -0700)]
Use precise if it's there
Alex Crichton [Wed, 30 Jul 2014 19:43:29 +0000 (12:43 -0700)]
Fix all tests and rebase conflicts
This rebases the lockfile branch to master and updates all code necessary to get
the tests passing again.
Tim Carey-Smith [Sat, 26 Jul 2014 00:23:40 +0000 (17:23 -0700)]
Successfully roundtrip the lockfile
This writes out and reads the lockfile, but it does nothing to verify
that the lockfile is still up to date, so it's not actually ready to be
used.
Tim Carey-Smith [Fri, 25 Jul 2014 23:05:27 +0000 (16:05 -0700)]
ICE
Tim Carey-Smith [Thu, 24 Jul 2014 22:55:54 +0000 (15:55 -0700)]
WIP
Tim Carey-Smith [Tue, 15 Jul 2014 22:35:05 +0000 (15:35 -0700)]
[WIP] Generate Cargo.lock on successful resolve
bors [Wed, 30 Jul 2014 20:23:49 +0000 (20:23 +0000)]
auto merge of #298 : alexcrichton/cargo/readme, r=wycats
Closes #271
Closes #274
Closes #292
bors [Wed, 30 Jul 2014 19:59:30 +0000 (19:59 +0000)]
auto merge of #297 : alexcrichton/cargo/url, r=wycats
The standard url library is soon-to-be deprecated, and now that we're
bootstrapping it's trivial to move over to rust-url.
Closes #204
bors [Wed, 30 Jul 2014 17:58:28 +0000 (17:58 +0000)]
auto merge of #295 : alexcrichton/cargo/snapshots, r=alexcrichton,me
Alex Crichton [Wed, 30 Jul 2014 17:11:36 +0000 (10:11 -0700)]
Update the README with current information
Closes #271
Closes #274
Closes #292
Alex Crichton [Wed, 30 Jul 2014 16:52:37 +0000 (09:52 -0700)]
Migrate from liburl to rust-url
The standard url library is soon-to-be deprecated, and now that we're
bootstrapping it's trivial to move over to rust-url.
Closes #204
Alex Crichton [Wed, 30 Jul 2014 01:11:51 +0000 (18:11 -0700)]
Register new snapshots
bors [Tue, 29 Jul 2014 21:30:40 +0000 (21:30 +0000)]
auto merge of #290 : omasanori/cargo/makefile, r=alexcrichton
Both Makefile.in and install.sh prepended `${DESTDIR}` to `${PREFIX}` so the installation prefix became `${DESTDIR}/${DESTDIR}/${PREFIX}`. Also, the script assumes that `${DESTDIR}` ends with a slash or `${PREFIX}` starts with it so I appended a slash to `${DESTDIR}`.
bors [Tue, 29 Jul 2014 21:14:29 +0000 (21:14 +0000)]
auto merge of #285 : alexcrichton/cargo/fix-cargo-doc, r=wycats
The existing rustdoc behavior for working with an already-present directory is
good enough, so there's no need for cargo to help out by blowing things away.
This also makes the copy-back portion easier by just not having it.
Closes #284
bors [Tue, 29 Jul 2014 20:44:31 +0000 (20:44 +0000)]
auto merge of #255 : michaelsproul/cargo/missing-pkg-error, r=alexcrichton
I've changed the error message that appears when a dependency can't be located. With my changes, mismatches between Cargo.toml dependency names and actual dependency package names are (slightly) more apparent. This doesn't change the error that appears when a dependency has an invalid source.
Example:
```toml
# Cargo.toml
...
[dependencies.foo]
path = "foo"
```
```toml
# foo/Cargo.toml
[package]
name = "not_foo"
```
Previously:
```
$ cargo build
No package named Dependency { name: foo, namespace: file:/home/michael/cargo_test, req: *, transitive: true } found
```
Now:
```
$ cargo build
No package named `foo` found (required by `bar`).
Location searched: /some/folder/not_foo
Version required: *
```
In verbose mode I think it would be also nice to print a list of packages that Cargo *does* know about. Something like: "Known packages amongst dependencies: not_foo, etc"
bors [Tue, 29 Jul 2014 19:44:34 +0000 (19:44 +0000)]
auto merge of #286 : benizi/cargo/fix/update-build-in-readme, r=alexcrichton
- Remove outdated `git submodule` instructions
- Add new `./configure` build step
OGINO Masanori [Tue, 29 Jul 2014 14:24:35 +0000 (23:24 +0900)]
Remove duplicated ${DESTDIR}.
Both Makefile.in and install.sh prepended ${DESTDIR} to ${PREFIX} so the
installation prefix became ${DESTDIR}/${DESTDIR}/${PREFIX}.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Michael Sproul [Thu, 24 Jul 2014 11:16:20 +0000 (21:16 +1000)]
Improve the error message for missing packages.
bors [Tue, 29 Jul 2014 05:29:34 +0000 (05:29 +0000)]
auto merge of #283 : alexcrichton/cargo/fix-fresh-plugin-deps, r=wycats
When copying files over from the old root to the new root on a fresh
compilation, care must be taken to preserve the correct plugin/host version of
each dependency. The previous code copied back over at most one library, but
this commit fixes this behavior by copying over all targets necessary for
compilation.
Benjamin R. Haskell [Tue, 29 Jul 2014 05:13:30 +0000 (01:13 -0400)]
Update README with new build instructions
- Remove outdated `git submodule` instructions
- Add new `./configure` build step
Alex Crichton [Tue, 29 Jul 2014 03:09:07 +0000 (20:09 -0700)]
Don't blow away target/doc
The existing rustdoc behavior for working with an already-present directory is
good enough, so there's no need for cargo to help out by blowing things away.
This also makes the copy-back portion easier by just not having it.
Closes #284
Alex Crichton [Tue, 29 Jul 2014 02:35:08 +0000 (19:35 -0700)]
Correctly preserve plugin deps
When copying files over from the old root to the new root on a fresh
compilation, care must be taken to preserve the correct plugin/host version of
each dependency. The previous code copied back over at most one library, but
this commit fixes this behavior by copying over all targets necessary for
compilation.
bors [Tue, 29 Jul 2014 01:17:48 +0000 (01:17 +0000)]
auto merge of #277 : alexcrichton/cargo/add-configure-script, r=wycats
This configure script is similar to rust's in that it doesn't require anything
like autotools, it's just a meta-script to "generate" a makefile and perform
run-of-the-mill validation/discovery before the Makefile is run.
The main purpose of this rewrite is to support multi-target and targeted builds.
This will allow us to produce 32-bit snapshots for platforms as well as easily
providing `./configure --target $foo` for initialization.
cc #274
Alex Crichton [Mon, 28 Jul 2014 15:01:54 +0000 (08:01 -0700)]
Add a configure script
This configure script is similar to rust's in that it doesn't require anything
like autotools, it's just a meta-script to "generate" a makefile and perform
run-of-the-mill validation/discovery before the Makefile is run.
The main purpose of this rewrite is to support multi-target and targeted builds.
This will allow us to produce 32-bit snapshots for platforms as well as easily
providing `./configure --target $foo` for initialization.
cc #274
bors [Tue, 29 Jul 2014 00:14:32 +0000 (00:14 +0000)]
auto merge of #282 : alexcrichton/cargo/fix-some-cross-compile-with-plugins, r=wycats
* Make sure plugins link to plugin dependencies, not target dependencies.
Previously the --extern flag was being passed incorrectly but the dependency
was being picked up by -L anyway.
* Fix a type and actually put the host dep directory into LD_LIBRARY_PATH, not
the target directory. A test was added for this change.
Alex Crichton [Tue, 29 Jul 2014 00:08:46 +0000 (17:08 -0700)]
Fix some dep errors with cross-compiled plugins
* Make sure plugins link to plugin dependencies, not target dependencies.
Previously the --extern flag was being passed incorrectly but the dependency
was being picked up by -L anyway.
* Fix a type and actually put the host dep directory into LD_LIBRARY_PATH, not
the target directory. A test was added for this change.
bors [Mon, 28 Jul 2014 21:14:32 +0000 (21:14 +0000)]
auto merge of #281 : alexcrichton/cargo/no-more-warnings, r=wycats
This helps keep the build a little cleaner and any breakage that happens due to
rust changing will likely be mitigated by nightlies.
Alex Crichton [Mon, 28 Jul 2014 20:57:57 +0000 (13:57 -0700)]
Deny all warnings when building cargo
This helps keep the build a little cleaner and any breakage that happens due to
rust changing will likely be mitigated by nightlies.
bors [Mon, 28 Jul 2014 20:39:24 +0000 (20:39 +0000)]
auto merge of #266 : alexcrichton/cargo/docopt, r=wycats
The hammer library currently has some shortcomings such as the inability to
document individual options. Additionally our handling with hammer of extra
arguments is dodgy at best currently.
This commit moves the repository to BurntSushi's docopt.rs library which seems
to more feature-complete at this time. Additionally, docopt has the great
benefit of a "document once, use everywhere" documentation strategy.
This migration solves two primary issues:
* Comprehensive and useful CLI documentation
* Gracefully handling flavorful combinations of arguments in odd combinations
Alex Crichton [Thu, 24 Jul 2014 19:43:10 +0000 (12:43 -0700)]
Move from hammer to docopt for option parsing
The hammer library currently has some shortcomings such as the inability to
document individual options. Additionally our handling with hammer of extra
arguments is dodgy at best currently.
This commit moves the repository to BurntSushi's docopt.rs library which seems
to more feature-complete at this time. Additionally, docopt has the great
benefit of a "document once, use everywhere" documentation strategy.
This migration solves two primary issues:
* Comprehensive and useful CLI documentation
* Gracefully handling flavorful combinations of arguments in odd combinations
Closes #218
bors [Mon, 28 Jul 2014 18:50:40 +0000 (18:50 +0000)]
auto merge of #268 : alexcrichton/cargo/issue-267, r=wycats
Previously a pipe was made which could mess with stdin like in #267.
Closes #267
bors [Mon, 28 Jul 2014 18:20:03 +0000 (18:20 +0000)]
auto merge of #254 : alexcrichton/cargo/cargo-doc, r=wycats
This is blocked until https://github.com/rust-lang/rust/pull/15939 lands, but in the meantime I figured I could get some eyes on this to make sure I'm sane.
Closes #130
bors [Mon, 28 Jul 2014 17:54:13 +0000 (17:54 +0000)]
auto merge of #265 : alexcrichton/cargo/issue-261, r=wycats
Receiving a signal is normally indicative of violent termination, so the
subcommand can't be relied upon to have printed some status information. As a
result, signals now have some extra errors printed to stderr when they fail.
Closes #261. The actual signal is still a bug, but it's an upstream rust bug.
bors [Mon, 28 Jul 2014 17:39:38 +0000 (17:39 +0000)]
auto merge of #276 : alexcrichton/cargo/fix-exe, r=carllerche
There was a bug when this was written in rustc that prevented this, but it has
since been fixed.
Alex Crichton [Mon, 28 Jul 2014 17:32:14 +0000 (10:32 -0700)]
Correctly discover exe suffix through rustc
There was a bug when this was written in rustc that prevented this, but it has
since been fixed.
Alex Crichton [Tue, 22 Jul 2014 15:06:36 +0000 (08:06 -0700)]
Add a cargo-doc command
bors [Sat, 26 Jul 2014 04:21:30 +0000 (04:21 +0000)]
auto merge of #256 : alexcrichton/cargo/bootstrap, r=wycats
This is extracted from #234 for sanity.
Cargo will inevitably pick up more dependencies over time such as flate compression, tarfile management, an external liburl, etc. These dependencies quickly get out of hand when using submodules, and it's much easier to rely on cargo to just build all these projects.
This is strategy is not guaranteed to work 100% of the time as rust's bootstrapping strategy does. The version of rust being used for a snapshot is not locked down, and a snapshot is not necessarily compatible with all versions of rust. In the worse case scenario we can either create a wrapper `rustc` to be compatible with the last snapshot, or we can have an escape hatch to build everything with Makefiles manually.
This transition seems inevitable, however, and it seems prudent to get the process underway sooner rather than later to smooth out the kinks.
Alex Crichton [Wed, 16 Jul 2014 00:51:49 +0000 (17:51 -0700)]
Bootstrap cargo with cargo
Alex Crichton [Sat, 26 Jul 2014 04:10:43 +0000 (21:10 -0700)]
Inherit stdin when using `cargo run`
Previously a pipe was made which could mess with stdin like in #267.
Closes #267
Alex Crichton [Fri, 25 Jul 2014 22:38:06 +0000 (15:38 -0700)]
Print a message when a command receives a signal
Receiving a signal is normally indicative of violent termination, so the
subcommand can't be relied upon to have printed some status information. As a
result, signals now have some extra errors printed to stderr when they fail.
Closes #261. The actual signal is still a bug, but it's an upstream rust bug.
bors [Fri, 25 Jul 2014 20:42:14 +0000 (20:42 +0000)]
auto merge of #263 : rust-lang/cargo/transitive-deps-unfiltered, r=wycats
Carl Lerche [Fri, 25 Jul 2014 18:35:11 +0000 (11:35 -0700)]
Pass in initialized Source types into compile op
bors [Fri, 25 Jul 2014 02:37:57 +0000 (02:37 +0000)]
auto merge of #260 : alexcrichton/cargo/issue-229, r=wycats
The fingerprinting code was erroneously using all sources from a manifest when
calculating the fingerprint which meant that sources not yet downloaded were
attempted to be fingerprinted.
The correct source to fingerprint is located in the SourceId field of the
resolved PackageId.
Closes #259
Alex Crichton [Fri, 25 Jul 2014 02:14:18 +0000 (19:14 -0700)]
Base get_fingerprint on a PackageId
The fingerprinting code was erroneously using all sources from a manifest when
calculating the fingerprint which meant that sources not yet downloaded were
attempted to be fingerprinted.
The correct source to fingerprint is located in the SourceId field of the
resolved PackageId.
Closes #259
bors [Thu, 24 Jul 2014 19:44:41 +0000 (19:44 +0000)]
auto merge of #257 : alexcrichton/cargo/ld-lib-path, r=wycats
At runtime rustc will dlopen() plugins, and if plugins have dynamic dependencies
they're likely to be in target/deps, so we need to make sure that directory is
in the right search path.
Alex Crichton [Thu, 24 Jul 2014 19:30:47 +0000 (12:30 -0700)]
Ensure LD_LIBRARY_PATH is correct for plugins
At runtime rustc will dlopen() plugins, and if plugins have dynamic dependencies
they're likely to be in target/deps, so we need to make sure that directory is
in the right search path.
bors [Thu, 24 Jul 2014 18:44:40 +0000 (18:44 +0000)]
auto merge of #253 : jdeseno/cargo/find-root-manifest, r=alexcrichton
A few of the sub-commands seem to use the same code for loading the project manifest.
I'd like to get rid of the nested matches but, I can't figure how to use something like `and_then` & `or_else` where the type is promoted (Option -> CargoResult etc.)
bors [Thu, 24 Jul 2014 06:29:38 +0000 (06:29 +0000)]
auto merge of #252 : rust-lang/cargo/pkg-version-env-var, r=wycats
Carl Lerche [Thu, 24 Jul 2014 00:57:49 +0000 (17:57 -0700)]
Supply the crate version via ENV vars
Joshua DeSeno [Thu, 24 Jul 2014 01:54:28 +0000 (10:54 +0900)]
Replace duplicate code for loading project manifest
bors [Wed, 23 Jul 2014 20:10:26 +0000 (20:10 +0000)]
auto merge of #251 : alexcrichton/cargo/print-the-failure, r=wycats
This previously relied on the test itself printing failure, but this is not
always the case for test which, for example, segfault. Instead this ensures that
*something* is always printed when a test fails, normally a short blurb about
what executable failed to run.
Alex Crichton [Wed, 23 Jul 2014 19:49:32 +0000 (12:49 -0700)]
Ensure a message is printed on test failure
This previously relied on the test itself printing failure, but this is not
always the case for test which, for example, segfault. Instead this ensures that
*something* is always printed when a test fails, normally a short blurb about
what executable failed to run.
Alex Crichton [Wed, 23 Jul 2014 19:47:59 +0000 (12:47 -0700)]
Allow omitting part of the output of a process
Sometimes it's a pain to match the *exact* output of a process, so this adds a
placeholder where `[..]` indicates "any more input on this line". It can in
theory be used multiple times in a input string.
bors [Wed, 23 Jul 2014 19:20:15 +0000 (19:20 +0000)]
auto merge of #249 : alexcrichton/cargo/fix-test-twice, r=wycats
These are both related to destroying the build directory and then recreating it.
Alex Crichton [Wed, 23 Jul 2014 16:36:49 +0000 (09:36 -0700)]
Only copy over the native output directory once
Previously it was copying once per target, not once per package.
Alex Crichton [Wed, 23 Jul 2014 16:35:22 +0000 (09:35 -0700)]
Print unknown errors with --verbose
Alex Crichton [Wed, 23 Jul 2014 16:09:33 +0000 (09:09 -0700)]
Fix `cargo test` with a dylib when run twice
The filename of the test for a dylib wasn't being calcuated correctly, so when
freshness was copying data over it ended up copying the same file twice.
bors [Wed, 23 Jul 2014 19:03:33 +0000 (19:03 +0000)]
auto merge of #250 : alexcrichton/cargo/test-deps, r=wycats
* Ensure that binaries are present for integration tests (as well as libraries)
* Ensure that same-named binaries/libs/tests never clash. Examples are excluded for now because they should probably be built to a separate directory.
Alex Crichton [Wed, 23 Jul 2014 18:58:09 +0000 (11:58 -0700)]
Ensure binaries are present for tests
Also make sure that binaries are named appropriately so they don't clash.
Alex Crichton [Wed, 23 Jul 2014 18:44:15 +0000 (11:44 -0700)]
Fix integration tests with same names as libs
Use extra-filename mixins to ensure that these names never clash.
Alex Crichton [Wed, 23 Jul 2014 18:31:47 +0000 (11:31 -0700)]
Fix dependencies during tests
A library target is needed for testing if any examples or integration tests are
being built, similarly with bin targets.
Alex Crichton [Wed, 23 Jul 2014 18:27:02 +0000 (11:27 -0700)]
Don't pass around Option<&[T]> for libs/bins
These ended up being Some([]) much of the time which was confusing because it
was being interpreted incorrectly. By passing just slices we know when there's
an element or not.
bors [Wed, 23 Jul 2014 15:53:49 +0000 (15:53 +0000)]
auto merge of #248 : alexcrichton/cargo/issue-225, r=wycats
The current package being built should never be overridden, only its
dependencies.
Closes #225
Alex Crichton [Wed, 23 Jul 2014 15:52:32 +0000 (08:52 -0700)]
Add `cargo new` to the `cargo help` message
Alex Crichton [Wed, 23 Jul 2014 15:49:02 +0000 (08:49 -0700)]
Filter the current package out of override paths
The current package being built should never be overridden, only its
dependencies.
Closes #225
bors [Wed, 23 Jul 2014 15:29:36 +0000 (15:29 +0000)]
auto merge of #246 : alexcrichton/cargo/issue-227, r=wycats
Test by @EdShaw!
Closes #227
bors [Wed, 23 Jul 2014 00:59:40 +0000 (00:59 +0000)]
auto merge of #247 : alexcrichton/cargo/extern-myself-please, r=carllerche
The test and bin executables weren't getting the correct --extern flags when
tested and built, so the names were conflicting. This passes --extern for the
local crate to ensure the right crate is picked up.
Alex Crichton [Wed, 23 Jul 2014 00:53:38 +0000 (17:53 -0700)]
Fix crates with the same name as standard crates
The test and bin executables weren't getting the correct --extern flags when
tested and built, so the names were conflicting. This passes --extern for the
local crate to ensure the right crate is picked up.
bors [Tue, 22 Jul 2014 17:44:39 +0000 (17:44 +0000)]
auto merge of #240 : alexcrichton/cargo/cargo-new, r=wycats
This command is used to create a new cargo repository at a destination that
previously does not exist. A separate command, cargo-init, will be implemented
to initialize an already-existing repository.
cc #21
This is currently rebased on #238
Alex Crichton [Tue, 22 Jul 2014 05:19:31 +0000 (22:19 -0700)]
Implement cargo-new
This command is used to create a new cargo repository at a destination that
previously does not exist. A separate command, cargo-init, will be implemented
to initialize an already-existing repository.
cc #21
Alex Crichton [Tue, 22 Jul 2014 17:21:27 +0000 (10:21 -0700)]
Don't rename a directory to a directory
Test by @EdShaw!
Closes #227
bors [Tue, 22 Jul 2014 17:08:50 +0000 (17:08 +0000)]
auto merge of #245 : alexcrichton/cargo/fix-fresh, r=wycats
This ends up serving the same purpose, but a critical change is that it
canonicalizes the relevant git url (if one is used) to ensure that the same
package from two slightly different locations is always built the same way.
Sadly I'm not quite sure how to add a test for this as it involves using remote
git urls which are unusable during tests.